﻿Imports System.ComponentModel
Imports System.Text

Namespace rtmpGUI
	Partial Public Class AddChannel
		Inherits Form

		Private fmain As Main

		Public Sub New(ByVal _main As Main)
			InitializeComponent()
			Me.Font = SystemFonts.MessageBoxFont
			fmain = _main
		End Sub

		Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCancel.Click
			Me.Hide()
		End Sub

		Private Sub btnOkay_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnOkay.Click
			Dim array() As String = { txtTitle.Text, txtswfUrl.Text, txtLink.Text, txtPageUrl.Text, txtPlaypath.Text, txtLanguage.Text, txtAdvanced.Text, txtResolution.Text, txtBitrate.Text }
			fmain.AddChanel(array)
			Me.Hide()
		End Sub

		Private Sub txtTitle_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) Handles txtTitle.KeyDown
			If e.KeyCode = Keys.Enter Then
				btnOkay_Click(Nothing, Nothing)
			End If
		End Sub
	End Class
End Namespace